package com.IoLiu;

import java.io.*;

public class CopyVideo {
    public static void main(String[] args) throws IOException {
        long startsTime=System.currentTimeMillis();
        method();
        long endsTime=System.currentTimeMillis();
        System.out.println(endsTime-startsTime);
    }

    private static void method() throws IOException {
        BufferedInputStream bis=new BufferedInputStream(new
                FileInputStream("D:\\黑马视频\\EV录屏\\java.mp4"));
        BufferedOutputStream bos=new BufferedOutputStream(new
                FileOutputStream("D:\\下载\\file\\file1\\java.mp4",true));
        byte[] bys=new byte[1024];
        int len;
        while((len=bis.read(bys))!=-1){
            bos.write(bys,0,len);
        }
        bos.close();
        bis.close();
    }
}
